using Digitalmes.Application.Mes.Masters.Lines;

namespace Digitalmes.Application.Mes.Masters.Workstations;

/// <summary>
/// 工位 DTO 对象。
/// </summary>
public sealed class MdWorkstationDto : Dto
{
    /// <summary>
    /// 工站编号
    /// </summary>
    [NotNull]
    public string? WsCode { get; set; }

    /// <summary>
    /// 工站名称
    /// </summary>
    [NotNull]
    public string? WsName { get; set; }

    /// <summary>
    /// 所属产线 Id
    /// </summary>
    public long LineId { get; set; }

    /// <summary>
    /// 产线
    /// </summary>
    public MdLineDto? Line { get; set; }

    /// <summary>
    /// 工位类型。（分 作业、上件口、下件口、NG口、返工）
    /// </summary>
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public WorkstationTypeEnum WsType { get; set; }

    /// <summary>
    /// 排序
    public int Order { get; set; }

    /// <summary>
    /// 启用状态（0->停用，1->启用）
    /// </summary>
    public EnabledStatusEnum Status { get; set; }

    public string? CreatedBy { get; set; }

    public DateTime CreatedTime { get; set; }

    public string? UpdatedBy { get; set; }

    public DateTime? UpdatedTime { get; set; }
}
